package com.xsy.mygame;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;

import com.xsy.localgame.game2048.Main2048Activity;
import com.xsy.localgame.puzzle.PuzzleActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btn_game1).setOnClickListener(v -> {
            Intent intent = new Intent(this, Main2048Activity.class);
            startActivity(intent);
        });

        findViewById(R.id.btn_game2).setOnClickListener(v -> {
            Intent intent = new Intent(this, PuzzleActivity.class);
            intent.putExtra("image_url",R.mipmap.image2);
            startActivity(intent);
        });
    }
}